<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-CPP: TEdit类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-CPP
   </div>
   <div id="projectbrief">AWTK CPP API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="class_t_edit-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">TEdit类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a>&gt;</code></p>
<div class="dynheader">
类 TEdit 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_t_edit.png" usemap="#TEdit_map" alt=""/>
  <map id="TEdit_map" name="TEdit_map">
<area href="class_t_combo_box.html" alt="TComboBox" shape="rect" coords="0,112,93,136"/>
<area href="class_t_spin_box.html" alt="TSpinBox" shape="rect" coords="103,112,196,136"/>
<area href="class_t_combo_box_ex.html" alt="TComboBoxEx" shape="rect" coords="0,168,93,192"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a83bcec0ab6b236b5e1c23140341a51c4"><td class="memItemLeft" align="right" valign="top"><a id="a83bcec0ab6b236b5e1c23140341a51c4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TEdit</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:a83bcec0ab6b236b5e1c23140341a51c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b796c2692138c8ea30018e9db951650"><td class="memItemLeft" align="right" valign="top"><a id="a1b796c2692138c8ea30018e9db951650"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>TEdit</b> (const edit_t *nativeObj)</td></tr>
<tr class="separator:a1b796c2692138c8ea30018e9db951650"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a800b612a6de458ec938721f23326f58c"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a800b612a6de458ec938721f23326f58c">GetInt</a> ()</td></tr>
<tr class="separator:a800b612a6de458ec938721f23326f58c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ea74a1b250df13cb77148976f4dc3dd"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a3ea74a1b250df13cb77148976f4dc3dd">GetDouble</a> ()</td></tr>
<tr class="separator:a3ea74a1b250df13cb77148976f4dc3dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a928635cb9975867d431bfd034ad8319b"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a928635cb9975867d431bfd034ad8319b">SetInt</a> (int32_t value)</td></tr>
<tr class="separator:a928635cb9975867d431bfd034ad8319b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6236322f2c2e9210c273354bb48c0c70"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a6236322f2c2e9210c273354bb48c0c70">SetDouble</a> (double value)</td></tr>
<tr class="separator:a6236322f2c2e9210c273354bb48c0c70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbf7d2344674af49be26151ff7cef041"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#acbf7d2344674af49be26151ff7cef041">SetTextLimit</a> (uint32_t min, uint32_t max)</td></tr>
<tr class="separator:acbf7d2344674af49be26151ff7cef041"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f943d75a18a5a6b577da6111e0e4b24"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a7f943d75a18a5a6b577da6111e0e4b24">SetIntLimit</a> (int32_t min, int32_t max, uint32_t step)</td></tr>
<tr class="separator:a7f943d75a18a5a6b577da6111e0e4b24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07a34cc8da8e59b6aa3f4a8f3343692e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a07a34cc8da8e59b6aa3f4a8f3343692e">SetFloatLimit</a> (double min, double max, double step)</td></tr>
<tr class="separator:a07a34cc8da8e59b6aa3f4a8f3343692e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad444747ab31a42e1cf170fc1331d6eb1"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#ad444747ab31a42e1cf170fc1331d6eb1">SetReadonly</a> (bool readonly)</td></tr>
<tr class="separator:ad444747ab31a42e1cf170fc1331d6eb1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcbcb29229a00fbd7ee8bd4aa74c61de"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#adcbcb29229a00fbd7ee8bd4aa74c61de">SetAutoFix</a> (bool auto_fix)</td></tr>
<tr class="separator:adcbcb29229a00fbd7ee8bd4aa74c61de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2804ed044afbfa2e52c5134c6d61aa17"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a2804ed044afbfa2e52c5134c6d61aa17">SetSelectNoneWhenFocused</a> (bool select_none_when_focused)</td></tr>
<tr class="separator:a2804ed044afbfa2e52c5134c6d61aa17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e0cc4ee6e18087696865c15a74e9381"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a9e0cc4ee6e18087696865c15a74e9381">SetOpenImWhenFocused</a> (bool open_im_when_focused)</td></tr>
<tr class="separator:a9e0cc4ee6e18087696865c15a74e9381"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07719518ea4a28b57e7874d6556dbcbe"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a07719518ea4a28b57e7874d6556dbcbe">SetInputType</a> (input_type_t type)</td></tr>
<tr class="separator:a07719518ea4a28b57e7874d6556dbcbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abdc5e1e76ac66aa2c8eafed2e230d6e7"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#abdc5e1e76ac66aa2c8eafed2e230d6e7">SetInputTips</a> (char *tips)</td></tr>
<tr class="separator:abdc5e1e76ac66aa2c8eafed2e230d6e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af67611a4bfdd8cc10cc5b366b264147e"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#af67611a4bfdd8cc10cc5b366b264147e">SetPasswordVisible</a> (bool password_visible)</td></tr>
<tr class="separator:af67611a4bfdd8cc10cc5b366b264147e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5911767134a7130de49b877e9fc1964"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#af5911767134a7130de49b877e9fc1964">SetFocus</a> (bool focus)</td></tr>
<tr class="separator:af5911767134a7130de49b877e9fc1964"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc7a8787885c1af4807918b4803d10a0"><td class="memItemLeft" align="right" valign="top">ret_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#afc7a8787885c1af4807918b4803d10a0">SetCursor</a> (uint32_t cursor)</td></tr>
<tr class="separator:afc7a8787885c1af4807918b4803d10a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80da6d8e8194c93aed9d992c4ebce06c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a80da6d8e8194c93aed9d992c4ebce06c">GetReadonly</a> () const</td></tr>
<tr class="separator:a80da6d8e8194c93aed9d992c4ebce06c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2e487c50ee16e9861ff2b98c3c896e1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#ae2e487c50ee16e9861ff2b98c3c896e1">GetPasswordVisible</a> () const</td></tr>
<tr class="separator:ae2e487c50ee16e9861ff2b98c3c896e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd148cd2cc2f7a92ae330c22ea47add1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#afd148cd2cc2f7a92ae330c22ea47add1">GetAutoFix</a> () const</td></tr>
<tr class="separator:afd148cd2cc2f7a92ae330c22ea47add1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af461baf1bb7f1561275d8211890f4dd7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#af461baf1bb7f1561275d8211890f4dd7">GetSelectNoneWhenFocused</a> () const</td></tr>
<tr class="separator:af461baf1bb7f1561275d8211890f4dd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24107e61b22ed49402e7db7ccdbf80f9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a24107e61b22ed49402e7db7ccdbf80f9">GetOpenImWhenFocused</a> () const</td></tr>
<tr class="separator:a24107e61b22ed49402e7db7ccdbf80f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdce020503fd7f9de26a1daff26146c8"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#acdce020503fd7f9de26a1daff26146c8">GetTopMargin</a> () const</td></tr>
<tr class="separator:acdce020503fd7f9de26a1daff26146c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a456a5422fa238a26b8b1bb5beef7ac33"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a456a5422fa238a26b8b1bb5beef7ac33">GetBottomMargin</a> () const</td></tr>
<tr class="separator:a456a5422fa238a26b8b1bb5beef7ac33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e9c090d12e7b49184c9df116fada0a0"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a7e9c090d12e7b49184c9df116fada0a0">GetLeftMargin</a> () const</td></tr>
<tr class="separator:a7e9c090d12e7b49184c9df116fada0a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f151a9892f0528031672183931d0fef"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a3f151a9892f0528031672183931d0fef">GetRightMargin</a> () const</td></tr>
<tr class="separator:a3f151a9892f0528031672183931d0fef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21b711e8d494ca01cb5a3169f536b3ce"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a21b711e8d494ca01cb5a3169f536b3ce">GetTips</a> () const</td></tr>
<tr class="separator:a21b711e8d494ca01cb5a3169f536b3ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e81845aa7ea582699641556f4dfef9d"><td class="memItemLeft" align="right" valign="top">input_type_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a7e81845aa7ea582699641556f4dfef9d">GetInputType</a> () const</td></tr>
<tr class="separator:a7e81845aa7ea582699641556f4dfef9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaed7dd1cf6132e65e5f26959d8e77614"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#aaed7dd1cf6132e65e5f26959d8e77614">GetMin</a> () const</td></tr>
<tr class="separator:aaed7dd1cf6132e65e5f26959d8e77614"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e16709a1dd8458cba0d56808d2f6863"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a4e16709a1dd8458cba0d56808d2f6863">GetMax</a> () const</td></tr>
<tr class="separator:a4e16709a1dd8458cba0d56808d2f6863"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20b1206f028a9e138abb24eb1043abda"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a20b1206f028a9e138abb24eb1043abda">GetStep</a> () const</td></tr>
<tr class="separator:a20b1206f028a9e138abb24eb1043abda"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:acb761872c5edad90c05302873e0e41ef"><td class="memItemLeft" align="right" valign="top"><a id="acb761872c5edad90c05302873e0e41ef"></a>
static <a class="el" href="class_t_edit.html">TEdit</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (widget_t *nativeObj)</td></tr>
<tr class="separator:acb761872c5edad90c05302873e0e41ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a237bb23f151ac979121dfb5dd24594ed"><td class="memItemLeft" align="right" valign="top"><a id="a237bb23f151ac979121dfb5dd24594ed"></a>
static <a class="el" href="class_t_edit.html">TEdit</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const widget_t *nativeObj)</td></tr>
<tr class="separator:a237bb23f151ac979121dfb5dd24594ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04264ec75fb97fbca8de622b55265f9c"><td class="memItemLeft" align="right" valign="top"><a id="a04264ec75fb97fbca8de622b55265f9c"></a>
static <a class="el" href="class_t_edit.html">TEdit</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (TWidget &amp;obj)</td></tr>
<tr class="separator:a04264ec75fb97fbca8de622b55265f9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb40203659c19cdabac32529cf2ce2bb"><td class="memItemLeft" align="right" valign="top"><a id="acb40203659c19cdabac32529cf2ce2bb"></a>
static <a class="el" href="class_t_edit.html">TEdit</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Cast</b> (const TWidget &amp;obj)</td></tr>
<tr class="separator:acb40203659c19cdabac32529cf2ce2bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26b20f85d8539f92dfaf0732e5cc8b14"><td class="memItemLeft" align="right" valign="top">static TWidget&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t_edit.html#a26b20f85d8539f92dfaf0732e5cc8b14">Create</a> (TWidget &amp;parent, xy_t x, xy_t y, wh_t w, wh_t h)</td></tr>
<tr class="separator:a26b20f85d8539f92dfaf0732e5cc8b14"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>单行编辑器控件。</p>
<p>在基于SDL的平台，单行编辑器控件使用平台原生的输入法，对于嵌入式平台使用内置的输入法。</p>
<p>在使用内置的输入法时，软键盘由输入类型决定，开发者可以自定义软键盘的界面。</p>
<p>edit_t是widget\_t的子类控件，widget_t的函数均适用于edit_t控件。</p>
<p>edit_t本身可以做为容器，放入按钮等控件。有几个特殊的子控件：</p>
<p>名为"clear"的按钮。点击时清除编辑器中的内容。 名为"inc"的按钮。点击时增加编辑器的值，用于实现类似于spinbox的功能。 名为"dec"的按钮。点击时减少编辑器的值，用于实现类似于spinbox的功能。 名为"visible"的复选框。勾选时显示密码，反之不显示密码。</p>
<p>在xml中使用"edit"标签创建编辑器控件。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">edit</span> <span class="keyword">x</span>=<span class="stringliteral">&quot;c&quot;</span> <span class="keyword">y</span>=<span class="stringliteral">&quot;m&quot;</span> <span class="keyword">w</span>=<span class="stringliteral">&quot;80&quot;</span> <span class="keyword">h</span>=<span class="stringliteral">&quot;30&quot;</span></div>
<div class="line">*<span class="keyword">tips</span>=<span class="stringliteral">&quot;age&quot;</span> <span class="keyword">input_type</span>=<span class="stringliteral">&quot;uint&quot;</span> <span class="keyword">min</span>=<span class="stringliteral">&quot;0&quot;</span> <span class="keyword">max</span>=<span class="stringliteral">&quot;150&quot;</span> <span class="keyword">step</span>=<span class="stringliteral">&quot;1&quot;</span> <span class="keyword">auto_fix</span>=<span class="stringliteral">&quot;true&quot;</span> <span class="keyword">style</span>=<span class="stringliteral">&quot;number&quot;</span> /&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>XXX：需要在min/max/step之前设置input_type。 </p>
</blockquote>
<p>&gt;更多用法请参考： <a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/ui/edit.xml">edit.xml</a></p>
<p>在c代码中使用函数edit_create创建编辑器控件。如：</p>
<blockquote class="doxtable">
<p>创建之后，可以用widget_set_text或widget_set_text_utf8设置文本内容。 </p>
</blockquote>
<blockquote class="doxtable">
<p>完整示例请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk-c-demos/blob/master/demos/edit.c">edit demo</a></p>
<p>可用通过style来设置控件的显示风格，如字体的大小和颜色等等。如：</p>
<div class="fragment"><div class="line">*&lt;<span class="keywordtype">style</span> <span class="keyword">name</span>=<span class="stringliteral">&quot;default&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span>  <span class="keyword">text_color</span>=<span class="stringliteral">&quot;black&quot;</span> <span class="keyword">text_align_h</span>=<span class="stringliteral">&quot;left&quot;</span>&gt;</div>
<div class="line">*&lt;<span class="keywordtype">normal</span>     <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> /&gt;</div>
<div class="line">*&lt;<span class="keywordtype">focused</span>    <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> <span class="keyword">border_color</span>=<span class="stringliteral">&quot;black&quot;</span>/&gt;</div>
<div class="line">*&lt;<span class="keywordtype">disable</span>    <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;gray&quot;</span> <span class="keyword">text_color</span>=<span class="stringliteral">&quot;#d0d0d0&quot;</span> /&gt;</div>
<div class="line">*&lt;<span class="keywordtype">error</span>      <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> <span class="keyword">text_color</span>=<span class="stringliteral">&quot;red&quot;</span> /&gt;</div>
<div class="line">*&lt;<span class="keywordtype">empty</span>      <span class="keyword">bg_color</span>=<span class="stringliteral">&quot;#f0f0f0&quot;</span> <span class="keyword">text_color</span>=<span class="stringliteral">&quot;#a0a0a0&quot;</span> /&gt;</div>
<div class="line">*&lt;/<span class="keywordtype">style</span>&gt;</div>
</div><!-- fragment --><blockquote class="doxtable">
<p>更多用法请参考： </p>
</blockquote>
<p><a href="https://github.com/zlgopen/awtk/blob/master/demos/assets/default/raw/styles/default.xml#L104">theme default</a> </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a26b20f85d8539f92dfaf0732e5cc8b14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26b20f85d8539f92dfaf0732e5cc8b14">&#9670;&nbsp;</a></span>Create()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">TWidget TEdit::Create </td>
          <td>(</td>
          <td class="paramtype">TWidget &amp;&#160;</td>
          <td class="paramname"><em>parent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">xy_t&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">wh_t&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>创建edit对象</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">parent</td><td>父控件 </td></tr>
    <tr><td class="paramname">x</td><td>x坐标 </td></tr>
    <tr><td class="paramname">y</td><td>y坐标 </td></tr>
    <tr><td class="paramname">w</td><td>宽度 </td></tr>
    <tr><td class="paramname">h</td><td>高度</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>对象。 </dd></dl>

</div>
</div>
<a id="afd148cd2cc2f7a92ae330c22ea47add1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd148cd2cc2f7a92ae330c22ea47add1">&#9670;&nbsp;</a></span>GetAutoFix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TEdit::GetAutoFix </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>输入无效时，是否自动改正。 </p>

</div>
</div>
<a id="a456a5422fa238a26b8b1bb5beef7ac33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a456a5422fa238a26b8b1bb5beef7ac33">&#9670;&nbsp;</a></span>GetBottomMargin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TEdit::GetBottomMargin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>下边距。 </p>

</div>
</div>
<a id="a3ea74a1b250df13cb77148976f4dc3dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ea74a1b250df13cb77148976f4dc3dd">&#9670;&nbsp;</a></span>GetDouble()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double TEdit::GetDouble </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取double类型的值。</p>
<dl class="section return"><dt>返回</dt><dd>返回double的值。 </dd></dl>

</div>
</div>
<a id="a7e81845aa7ea582699641556f4dfef9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e81845aa7ea582699641556f4dfef9d">&#9670;&nbsp;</a></span>GetInputType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">input_type_t TEdit::GetInputType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>输入类型。 </p>

</div>
</div>
<a id="a800b612a6de458ec938721f23326f58c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a800b612a6de458ec938721f23326f58c">&#9670;&nbsp;</a></span>GetInt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t TEdit::GetInt </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获取int类型的值。</p>
<dl class="section return"><dt>返回</dt><dd>返回int的值。 </dd></dl>

</div>
</div>
<a id="a7e9c090d12e7b49184c9df116fada0a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e9c090d12e7b49184c9df116fada0a0">&#9670;&nbsp;</a></span>GetLeftMargin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TEdit::GetLeftMargin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>左边距。 </p>

</div>
</div>
<a id="a4e16709a1dd8458cba0d56808d2f6863"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e16709a1dd8458cba0d56808d2f6863">&#9670;&nbsp;</a></span>GetMax()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double TEdit::GetMax </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>最大值或最大长度。 </p>

</div>
</div>
<a id="aaed7dd1cf6132e65e5f26959d8e77614"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaed7dd1cf6132e65e5f26959d8e77614">&#9670;&nbsp;</a></span>GetMin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double TEdit::GetMin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>最小值或最小长度。 </p>

</div>
</div>
<a id="a24107e61b22ed49402e7db7ccdbf80f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24107e61b22ed49402e7db7ccdbf80f9">&#9670;&nbsp;</a></span>GetOpenImWhenFocused()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TEdit::GetOpenImWhenFocused </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获得焦点时打开输入法。</p>
<blockquote class="doxtable">
<p>主要用于没有指针设备的情况，否则每次切换焦点时都打开输入法。 </p>
</blockquote>

</div>
</div>
<a id="ae2e487c50ee16e9861ff2b98c3c896e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2e487c50ee16e9861ff2b98c3c896e1">&#9670;&nbsp;</a></span>GetPasswordVisible()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TEdit::GetPasswordVisible </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>密码是否可见。 </p>

</div>
</div>
<a id="a80da6d8e8194c93aed9d992c4ebce06c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80da6d8e8194c93aed9d992c4ebce06c">&#9670;&nbsp;</a></span>GetReadonly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TEdit::GetReadonly </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>编辑器是否为只读。 </p>

</div>
</div>
<a id="a3f151a9892f0528031672183931d0fef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f151a9892f0528031672183931d0fef">&#9670;&nbsp;</a></span>GetRightMargin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TEdit::GetRightMargin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>右边距。 </p>

</div>
</div>
<a id="af461baf1bb7f1561275d8211890f4dd7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af461baf1bb7f1561275d8211890f4dd7">&#9670;&nbsp;</a></span>GetSelectNoneWhenFocused()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool TEdit::GetSelectNoneWhenFocused </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>获得焦点时不选中文本。</p>
<blockquote class="doxtable">
<p>主要用于没有指针设备的情况，否则软键盘无法取消选中文本。 </p>
</blockquote>

</div>
</div>
<a id="a20b1206f028a9e138abb24eb1043abda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20b1206f028a9e138abb24eb1043abda">&#9670;&nbsp;</a></span>GetStep()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double TEdit::GetStep </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>步长。 作为数值型编辑器时，一次增加和减少时的数值。 </p>

</div>
</div>
<a id="a21b711e8d494ca01cb5a3169f536b3ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21b711e8d494ca01cb5a3169f536b3ce">&#9670;&nbsp;</a></span>GetTips()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char * TEdit::GetTips </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>输入提示。 </p>

</div>
</div>
<a id="acdce020503fd7f9de26a1daff26146c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acdce020503fd7f9de26a1daff26146c8">&#9670;&nbsp;</a></span>GetTopMargin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t TEdit::GetTopMargin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>上边距。 </p>

</div>
</div>
<a id="adcbcb29229a00fbd7ee8bd4aa74c61de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcbcb29229a00fbd7ee8bd4aa74c61de">&#9670;&nbsp;</a></span>SetAutoFix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetAutoFix </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>auto_fix</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置编辑器是否为自动改正。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">auto_fix</td><td>自动改正。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="afc7a8787885c1af4807918b4803d10a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc7a8787885c1af4807918b4803d10a0">&#9670;&nbsp;</a></span>SetCursor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetCursor </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>cursor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置输入框的光标坐标。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cursor</td><td>是否为焦点。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a6236322f2c2e9210c273354bb48c0c70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6236322f2c2e9210c273354bb48c0c70">&#9670;&nbsp;</a></span>SetDouble()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetDouble </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置double类型的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a07a34cc8da8e59b6aa3f4a8f3343692e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07a34cc8da8e59b6aa3f4a8f3343692e">&#9670;&nbsp;</a></span>SetFloatLimit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetFloatLimit </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>step</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置为浮点数输入及取值范围。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td>最小值。 </td></tr>
    <tr><td class="paramname">max</td><td>最大值。 </td></tr>
    <tr><td class="paramname">step</td><td>步长。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="af5911767134a7130de49b877e9fc1964"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5911767134a7130de49b877e9fc1964">&#9670;&nbsp;</a></span>SetFocus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetFocus </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>focus</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置为焦点。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">focus</td><td>是否为焦点。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="abdc5e1e76ac66aa2c8eafed2e230d6e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abdc5e1e76ac66aa2c8eafed2e230d6e7">&#9670;&nbsp;</a></span>SetInputTips()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetInputTips </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>tips</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置编辑器的输入提示。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">tips</td><td>输入提示。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a07719518ea4a28b57e7874d6556dbcbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07719518ea4a28b57e7874d6556dbcbe">&#9670;&nbsp;</a></span>SetInputType()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetInputType </td>
          <td>(</td>
          <td class="paramtype">input_type_t&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置编辑器的输入类型。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>输入类型。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a928635cb9975867d431bfd034ad8319b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a928635cb9975867d431bfd034ad8319b">&#9670;&nbsp;</a></span>SetInt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetInt </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置int类型的值。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>值。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7f943d75a18a5a6b577da6111e0e4b24"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f943d75a18a5a6b577da6111e0e4b24">&#9670;&nbsp;</a></span>SetIntLimit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetIntLimit </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>max</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>step</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置为整数输入及取值范围。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td>最小值。 </td></tr>
    <tr><td class="paramname">max</td><td>最大值。 </td></tr>
    <tr><td class="paramname">step</td><td>步长。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a9e0cc4ee6e18087696865c15a74e9381"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e0cc4ee6e18087696865c15a74e9381">&#9670;&nbsp;</a></span>SetOpenImWhenFocused()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetOpenImWhenFocused </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>open_im_when_focused</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置编辑器是否在获得焦点时打开输入法。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">open_im_when_focused</td><td>是否在获得焦点时打开输入法。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="af67611a4bfdd8cc10cc5b366b264147e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af67611a4bfdd8cc10cc5b366b264147e">&#9670;&nbsp;</a></span>SetPasswordVisible()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetPasswordVisible </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>password_visible</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>当编辑器输入类型为密码时，设置密码是否可见。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">password_visible</td><td>密码是否可见。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ad444747ab31a42e1cf170fc1331d6eb1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad444747ab31a42e1cf170fc1331d6eb1">&#9670;&nbsp;</a></span>SetReadonly()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetReadonly </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>readonly</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置编辑器是否为只读。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">readonly</td><td>只读。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a2804ed044afbfa2e52c5134c6d61aa17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2804ed044afbfa2e52c5134c6d61aa17">&#9670;&nbsp;</a></span>SetSelectNoneWhenFocused()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetSelectNoneWhenFocused </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>select_none_when_focused</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置编辑器是否在获得焦点时不选中文本。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">select_none_when_focused</td><td>是否在获得焦点时不选中文本。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="acbf7d2344674af49be26151ff7cef041"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbf7d2344674af49be26151ff7cef041">&#9670;&nbsp;</a></span>SetTextLimit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ret_t TEdit::SetTextLimit </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>设置为文本输入及其长度限制，不允许输入超过max个字符，少于min个字符时进入error状态。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td>最小长度。 </td></tr>
    <tr><td class="paramname">max</td><td>最大长度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/<a class="el" href="awtk__cpp_8hpp_source.html">awtk_cpp.hpp</a></li>
<li>output/awtk_cpp.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
